using System;
using System.Collections.Generic;
using System.Text;
using System.Data;



namespace THSLib
{
    #region STTHSDataTablesController
    /// <summary>
    /// This object represents the properties and methods of a THSDataTable.
    /// </summary>
    public class STTHSDataTablesController:BaseBusinessController
    {

        #region Query Declaration
        
        //Select By ForeignKey Queries
        private readonly string spGetSTTHSDataTablesBySTTHSDataSetID = "STTHSDataTables_SelectBySTTHSDataSetID";
        private readonly string spGetSTTHSDataTablesBySTTHSDataSetIDAndSTTHSDataTableName =
                               "STTHSDataTables_SelectBySTTHSDataSetIDAndSTTHSDataTableName";

        //Delete by foreignkey Queries
        /*Remove cause of not use
        private readonly string spDeleteSTTHSDataTablesBySTTHSDataSetID = "STTHSDataTables_DeleteBySTTHSDataSetID";*/

        #endregion

        public STTHSDataTablesController()
        {
            //dal = new STTHSDataTablesDAL();
            dal = new DALBaseProvider("STTHSDataTables", typeof(STTHSDataTablesInfo));
        }       

        
        public DataSet GetTHSDataTableByTHSDataSetID(int iTHSDataSetID)
        {
            return (DataSet)dal.GetDataSet(spGetSTTHSDataTablesBySTTHSDataSetID, iTHSDataSetID);
        }

        public STTHSDataTablesInfo GetTHSDataTableByTHSDataSetIDAndTHSDataTableName(int iTHSDataSetID, String strSTTHSDataTableName)
        {
            return (STTHSDataTablesInfo)dal.GetDataObject(spGetSTTHSDataTablesBySTTHSDataSetIDAndSTTHSDataTableName, iTHSDataSetID, strSTTHSDataTableName);            
        }       
    }
    #endregion
}
